package com.ybu;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.security.PrivateKey;

/**
 * @ProjectName: shixun
 * @Titile: Student
 * @Author: Jie
 * @Description: TODO
 */
@Data
@AllArgsConstructor
public class Student implements Comparable<Student>{
    private String name;
    private int age;

    @Override
    public int compareTo(Student o) {
        //按照学生年龄正序排序
        return this.age - o.getAge();
    }
}
